import {lazy} from 'react'

import * as Type from '../utils/index'

//二级路由
export const homeRoutes:Type.RouterList=[
    {
        path:'/index/sy',
        element:lazy(()=>import("../view/index/Sy")),
    },
    {
        path:'/index/fl',
        element:lazy(()=>import("../view/index/Fl"))
    },{
        path:'/index/my',
        element:lazy(()=>import("../view/index/My"))
    },
]

//一级路由
const routes:Type.RouterList=[
    {
        path:'/',
        to:"/index/sy"
    },
    {
        path:'/index',
        element:lazy(()=>import("../view/Index")),
        children:homeRoutes
    },
    {
        path:'/login',
        element:lazy(()=>import("../view/Login"))
    },
    {
        path:'/xx',
        element:lazy(()=>import('../view/Xx'))
    },
    {
        path:'*',
        element:lazy(()=>import("../view/Error"))
    }
    
]

export default routes